<template>
  <div>
    <i-radio-group :current="current" @change="handleChange">
      <i-radio value="企业"></i-radio>
      <i-radio value="个人"></i-radio>
    </i-radio-group>

    <a :href="url" class="btn-round-blue">下一步</a>
  </div>
</template>

<script>
import {} from '@/utils'
import {} from '@/api'

export default {
  components: {},
  props: {},
  data () {
    return {
      current: '企业',
      type: {
        企业: 'COMPANY',
        个人: 'PERSONAL'
      },
      memberType: 'COMPANY'
    }
  },
  computed: {
    url () {
      if (this.memberType === 'COMPANY') {
        return '/pages/mine/cloud-account/step2/company/main'
      } else {
        return '/pages/mine/cloud-account/step2/personal/main'
      }
    }
  },
  watch: {},
  created () {},
  mounted () {},
  onShow () {},
  methods: {
    handleChange (e) {
      let val = e.target.value
      this.memberType = this.type[val]
      this.current = val
    }
  }
}
</script>

<style lang="scss" scoped>
.btn-round-blue {
  width: calc(100% - 30px);
  margin: 100px auto 0;
}
</style>
